package com.iotechn.unimall.data.dto.excel;

import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.ExcelTarget;
import cn.afterturn.easypoi.handler.inter.IExcelModel;
import lombok.Data;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;

/**
 * @author kyms
 * @date 2020-05-18 13:27
 */
@ExcelTarget("userCardExcelEntity")
@Data
public class UserCardExcelDTO implements IExcelModel {
    @Excel(name = "用户名")
    @NotNull(message = "必填")
    private String userName;
    @Excel(name = "手机号")
    @NotNull(message = "必填")
    private String phone;
    @Excel(name = "卡名称")
    @NotNull(message = "必填")
    private String cardName;
    @NotNull(message = "必填")
    @Excel(name = "卡编号")
    private String cardNo;
    @NotNull(message = "必填")
    @Excel(name = "金额")
    @Min(value = 0,message = "必须大于0")
    private Integer money;

    private String errorMsg;

    @Override
    public String getErrorMsg() {
        return errorMsg;
    }

    @Override
    public void setErrorMsg(String errorMsg) {
        this.errorMsg = errorMsg;
    }

}
